package link.cocoon.common.exception;

import link.cocoon.common.base.BaseEntity;

/**
 * 用于抛出数据校验异常.
 * @author xce
 * @date 2020/1/17  14:20
 */
public class DataCheckException extends RuntimeException implements BaseException{

  private int code;
  private Class clazz;

  @Override
  public int getCode() {
    return 8005;
  }

  @Override
  public Class getClazz() {
    return null;
  }

  public DataCheckException(String message, BaseEntity entity) {
    super(message);
    this.clazz = entity.getClass();
  }
}
